Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPIKE] Give details parent group role and summary element button role #5355

Closed
wants to merge 1 commit into from

Conversation

owenatgov
Copy link
Contributor

Offshoot of #5353 to try and isolate which part of that PR is working for dragon

@owenatgov owenatgov changed the title Give details parent group role and summary element button role [SPIKE] Give details parent group role and summary element button role Sep 26, 2024
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-5355 September 26, 2024 08:58 Inactive
Copy link

📋 Stats

File sizes

File Size
dist/govuk-frontend-development.min.css 118.62 KiB
dist/govuk-frontend-development.min.js 43.63 KiB
packages/govuk-frontend/dist/govuk/all.bundle.js 90.19 KiB
packages/govuk-frontend/dist/govuk/all.bundle.mjs 84.69 KiB
packages/govuk-frontend/dist/govuk/all.mjs 1.05 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend-component.mjs 359 B
packages/govuk-frontend/dist/govuk/govuk-frontend.min.css 118.6 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend.min.js 43.62 KiB
packages/govuk-frontend/dist/govuk/i18n.mjs 5.55 KiB
packages/govuk-frontend/dist/govuk/init.mjs 4.97 KiB

Modules

File Size (bundled) Size (minified)
all.mjs 81.8 KiB 41.48 KiB
accordion.mjs 23.5 KiB 12.39 KiB
button.mjs 5.98 KiB 2.69 KiB
character-count.mjs 22.4 KiB 9.92 KiB
checkboxes.mjs 5.83 KiB 2.83 KiB
error-summary.mjs 7.89 KiB 3.46 KiB
exit-this-page.mjs 17.1 KiB 9.26 KiB
header.mjs 4.46 KiB 2.6 KiB
notification-banner.mjs 6.26 KiB 2.62 KiB
password-input.mjs 15.15 KiB 7.25 KiB
radios.mjs 4.83 KiB 2.38 KiB
service-navigation.mjs 4.46 KiB 2.69 KiB
skip-link.mjs 4.39 KiB 2.18 KiB
tabs.mjs 10.05 KiB 6.06 KiB

View stats and visualisations on the review app


Action run for d98ef4b

Copy link

Rendered HTML changes to npm package

diff --git a/packages/govuk-frontend/dist/govuk/components/details/template-default.html b/packages/govuk-frontend/dist/govuk/components/details/template-default.html
index c267b0ba1..cb561a94f 100644
--- a/packages/govuk-frontend/dist/govuk/components/details/template-default.html
+++ b/packages/govuk-frontend/dist/govuk/components/details/template-default.html
@@ -1,5 +1,5 @@
-<details class="govuk-details">
-  <summary class="govuk-details__summary">
+<details role="group" class="govuk-details">
+  <summary class="govuk-details__summary" role="button">
     <span class="govuk-details__summary-text">
       Help with nationality
     </span>
diff --git a/packages/govuk-frontend/dist/govuk/components/details/template-expanded.html b/packages/govuk-frontend/dist/govuk/components/details/template-expanded.html
index fbd18a71a..c19967910 100644
--- a/packages/govuk-frontend/dist/govuk/components/details/template-expanded.html
+++ b/packages/govuk-frontend/dist/govuk/components/details/template-expanded.html
@@ -1,5 +1,5 @@
-<details id="help-with-nationality" class="govuk-details" open>
-  <summary class="govuk-details__summary">
+<details id="help-with-nationality" role="group" class="govuk-details" open>
+  <summary class="govuk-details__summary" role="button">
     <span class="govuk-details__summary-text">
       Help with nationality
     </span>
diff --git a/packages/govuk-frontend/dist/govuk/components/details/template-with-html.html b/packages/govuk-frontend/dist/govuk/components/details/template-with-html.html
index bd5dd1fd4..22d948db4 100644
--- a/packages/govuk-frontend/dist/govuk/components/details/template-with-html.html
+++ b/packages/govuk-frontend/dist/govuk/components/details/template-with-html.html
@@ -1,5 +1,5 @@
-<details class="govuk-details">
-  <summary class="govuk-details__summary">
+<details role="group" class="govuk-details">
+  <summary class="govuk-details__summary" role="button">
     <span class="govuk-details__summary-text">
       Where to find your National Insurance Number
     </span>

Action run for d98ef4b

Copy link

Other changes to npm package

diff --git a/packages/govuk-frontend/dist/govuk/components/details/fixtures.json b/packages/govuk-frontend/dist/govuk/components/details/fixtures.json
index eaac97378..66783f90e 100644
--- a/packages/govuk-frontend/dist/govuk/components/details/fixtures.json
+++ b/packages/govuk-frontend/dist/govuk/components/details/fixtures.json
@@ -11,7 +11,7 @@
             "description": "",
             "previewLayoutModifiers": [],
             "screenshot": false,
-            "html": "<details class=\"govuk-details\">\n  <summary class=\"govuk-details__summary\">\n    <span class=\"govuk-details__summary-text\">\n      Help with nationality\n    </span>\n  </summary>\n  <div class=\"govuk-details__text\">\n    We need to know your nationality so we can work out which elections you’re entitled to vote in. If you can’t provide your nationality, you’ll have to send copies of identity documents through the post.\n  </div>\n</details>"
+            "html": "<details role=\"group\" class=\"govuk-details\">\n  <summary class=\"govuk-details__summary\" role=\"button\">\n    <span class=\"govuk-details__summary-text\">\n      Help with nationality\n    </span>\n  </summary>\n  <div class=\"govuk-details__text\">\n    We need to know your nationality so we can work out which elections you’re entitled to vote in. If you can’t provide your nationality, you’ll have to send copies of identity documents through the post.\n  </div>\n</details>"
         },
         {
             "name": "expanded",
@@ -25,7 +25,7 @@
             "description": "",
             "previewLayoutModifiers": [],
             "screenshot": true,
-            "html": "<details id=\"help-with-nationality\" class=\"govuk-details\" open>\n  <summary class=\"govuk-details__summary\">\n    <span class=\"govuk-details__summary-text\">\n      Help with nationality\n    </span>\n  </summary>\n  <div class=\"govuk-details__text\">\n    We need to know your nationality so we can work out which elections you’re entitled to vote in. If you can’t provide your nationality, you’ll have to send copies of identity documents through the post.\n  </div>\n</details>"
+            "html": "<details id=\"help-with-nationality\" role=\"group\" class=\"govuk-details\" open>\n  <summary class=\"govuk-details__summary\" role=\"button\">\n    <span class=\"govuk-details__summary-text\">\n      Help with nationality\n    </span>\n  </summary>\n  <div class=\"govuk-details__text\">\n    We need to know your nationality so we can work out which elections you’re entitled to vote in. If you can’t provide your nationality, you’ll have to send copies of identity documents through the post.\n  </div>\n</details>"
         },
         {
             "name": "with html",
@@ -37,7 +37,7 @@
             "description": "",
             "previewLayoutModifiers": [],
             "screenshot": false,
-            "html": "<details class=\"govuk-details\">\n  <summary class=\"govuk-details__summary\">\n    <span class=\"govuk-details__summary-text\">\n      Where to find your National Insurance Number\n    </span>\n  </summary>\n  <div class=\"govuk-details__text\">\n    Your National Insurance number can be found on\n<ul>\n  <li>your National Insurance card</li>\n  <li>your payslip</li>\n  <li>P60</li>\n  <li>benefits information</li>\n  <li>tax return</li>\n</ul>\n\n  </div>\n</details>"
+            "html": "<details role=\"group\" class=\"govuk-details\">\n  <summary class=\"govuk-details__summary\" role=\"button\">\n    <span class=\"govuk-details__summary-text\">\n      Where to find your National Insurance Number\n    </span>\n  </summary>\n  <div class=\"govuk-details__text\">\n    Your National Insurance number can be found on\n<ul>\n  <li>your National Insurance card</li>\n  <li>your payslip</li>\n  <li>P60</li>\n  <li>benefits information</li>\n  <li>tax return</li>\n</ul>\n\n  </div>\n</details>"
         },
         {
             "name": "id",
@@ -50,7 +50,7 @@
             "description": "",
             "previewLayoutModifiers": [],
             "screenshot": false,
-            "html": "<details id=\"my-details-element\" class=\"govuk-details\">\n  <summary class=\"govuk-details__summary\">\n    <span class=\"govuk-details__summary-text\">\n      Expand this section\n    </span>\n  </summary>\n  <div class=\"govuk-details__text\">\n    Here are some more details\n  </div>\n</details>"
+            "html": "<details id=\"my-details-element\" role=\"group\" class=\"govuk-details\">\n  <summary class=\"govuk-details__summary\" role=\"button\">\n    <span class=\"govuk-details__summary-text\">\n      Expand this section\n    </span>\n  </summary>\n  <div class=\"govuk-details__text\">\n    Here are some more details\n  </div>\n</details>"
         },
         {
             "name": "html as text",
@@ -62,7 +62,7 @@
             "description": "",
             "previewLayoutModifiers": [],
             "screenshot": false,
-            "html": "<details class=\"govuk-details\">\n  <summary class=\"govuk-details__summary\">\n    <span class=\"govuk-details__summary-text\">\n      Expand this section\n    </span>\n  </summary>\n  <div class=\"govuk-details__text\">\n    More about the greater than symbol (&gt;)\n  </div>\n</details>"
+            "html": "<details role=\"group\" class=\"govuk-details\">\n  <summary class=\"govuk-details__summary\" role=\"button\">\n    <span class=\"govuk-details__summary-text\">\n      Expand this section\n    </span>\n  </summary>\n  <div class=\"govuk-details__text\">\n    More about the greater than symbol (&gt;)\n  </div>\n</details>"
         },
         {
             "name": "html",
@@ -74,7 +74,7 @@
             "description": "",
             "previewLayoutModifiers": [],
             "screenshot": false,
-            "html": "<details class=\"govuk-details\">\n  <summary class=\"govuk-details__summary\">\n    <span class=\"govuk-details__summary-text\">\n      Expand this section\n    </span>\n  </summary>\n  <div class=\"govuk-details__text\">\n    More about <b>bold text</b>\n  </div>\n</details>"
+            "html": "<details role=\"group\" class=\"govuk-details\">\n  <summary class=\"govuk-details__summary\" role=\"button\">\n    <span class=\"govuk-details__summary-text\">\n      Expand this section\n    </span>\n  </summary>\n  <div class=\"govuk-details__text\">\n    More about <b>bold text</b>\n  </div>\n</details>"
         },
         {
             "name": "summary html as text",
@@ -86,7 +86,7 @@
             "description": "",
             "previewLayoutModifiers": [],
             "screenshot": false,
-            "html": "<details class=\"govuk-details\">\n  <summary class=\"govuk-details__summary\">\n    <span class=\"govuk-details__summary-text\">\n      The greater than symbol (&gt;) is the best\n    </span>\n  </summary>\n  <div class=\"govuk-details__text\">\n    Here are some more details\n  </div>\n</details>"
+            "html": "<details role=\"group\" class=\"govuk-details\">\n  <summary class=\"govuk-details__summary\" role=\"button\">\n    <span class=\"govuk-details__summary-text\">\n      The greater than symbol (&gt;) is the best\n    </span>\n  </summary>\n  <div class=\"govuk-details__text\">\n    Here are some more details\n  </div>\n</details>"
         },
         {
             "name": "summary html",
@@ -98,7 +98,7 @@
             "description": "",
             "previewLayoutModifiers": [],
             "screenshot": false,
-            "html": "<details class=\"govuk-details\">\n  <summary class=\"govuk-details__summary\">\n    <span class=\"govuk-details__summary-text\">\n      Use <b>bold text</b> sparingly\n    </span>\n  </summary>\n  <div class=\"govuk-details__text\">\n    Here are some more details\n  </div>\n</details>"
+            "html": "<details role=\"group\" class=\"govuk-details\">\n  <summary class=\"govuk-details__summary\" role=\"button\">\n    <span class=\"govuk-details__summary-text\">\n      Use <b>bold text</b> sparingly\n    </span>\n  </summary>\n  <div class=\"govuk-details__text\">\n    Here are some more details\n  </div>\n</details>"
         },
         {
             "name": "classes",
@@ -111,7 +111,7 @@
             "description": "",
             "previewLayoutModifiers": [],
             "screenshot": false,
-            "html": "<details class=\"govuk-details some-additional-class\">\n  <summary class=\"govuk-details__summary\">\n    <span class=\"govuk-details__summary-text\">\n      Expand me\n    </span>\n  </summary>\n  <div class=\"govuk-details__text\">\n    Here are some more details\n  </div>\n</details>"
+            "html": "<details role=\"group\" class=\"govuk-details some-additional-class\">\n  <summary class=\"govuk-details__summary\" role=\"button\">\n    <span class=\"govuk-details__summary-text\">\n      Expand me\n    </span>\n  </summary>\n  <div class=\"govuk-details__text\">\n    Here are some more details\n  </div>\n</details>"
         },
         {
             "name": "attributes",
@@ -127,7 +127,7 @@
             "description": "",
             "previewLayoutModifiers": [],
             "screenshot": false,
-            "html": "<details class=\"govuk-details\" data-some-data-attribute=\"i-love-data\" another-attribute=\"foo\">\n  <summary class=\"govuk-details__summary\">\n    <span class=\"govuk-details__summary-text\">\n      Expand me\n    </span>\n  </summary>\n  <div class=\"govuk-details__text\">\n    Here are some more details\n  </div>\n</details>"
+            "html": "<details role=\"group\" class=\"govuk-details\" data-some-data-attribute=\"i-love-data\" another-attribute=\"foo\">\n  <summary class=\"govuk-details__summary\" role=\"button\">\n    <span class=\"govuk-details__summary-text\">\n      Expand me\n    </span>\n  </summary>\n  <div class=\"govuk-details__text\">\n    Here are some more details\n  </div>\n</details>"
         }
     ]
 }

Action run for d98ef4b

@owenatgov owenatgov closed this Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants